<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>

<link type="text/css" rel="stylesheet" href="../Public/css/reset.css">
<link type="text/css" rel="stylesheet" href="../Public/css/DateTimePicker.css">
<link type="text/css" rel="stylesheet" href="../Public/css/style.css">

<script type="text/javascript" src="../Public/script/jquery.js"></script>
<script type="text/javascript" src="../Public/script/distpicker.data.js"></script>
<script type="text/javascript" src="../Public/script/distpicker.js"></script>
<script type="text/javascript" src="../Public/script/DateTimePicker.js"></script>
<script type="text/javascript" src="../Public/layer/layer.js"></script>
<script type="text/javascript" src="../Public/script/jquery.SuperSlide.2.1.1.js"></script>
<style>
.hhhh{color: #49bf9d;}
</style>
<script type="text/javascript">


$(function(){

    $(".sh a").each(function(index){
      
     $(this).click(function(){   
         $('.sh').eq(index).addClass('hhhh').siblings().removeClass('hhhh');

       var id=$(this).attr('data-arr');

  $.ajax({
      url:'index.php?m=Home&c=Index&a=spid',
      data:{
         'spid':id
        },
        type:'post',
        dataType:'json',
        success:function(data){
                  
          var str="";
      
          for (var i = 0; i < data.length; i++) {

            
            str+=' <div class="c2li c2li2 fl" > <a class="img" href="{:U('Shop/detail')}&id='+data[i].id+'" ><img src="Uploads/'+data[i].img+'"><b>'+data[i].name+'</b></a></div>';
                
          }
            $('.c2list').html(str);
       


       
        }

    });




   });  
    });       




})


</script>
</head>

<body>
    
<include file="Common:header"/>
    <!--contain-->
    <div class="contain">

        <div class="indexCont">
        	<div class="widthBlock">
            	<div class="cont1">
                	<div class="form fl">
                    	<form  action="{:U('Index/yuyue')}" method="post">
                        <div class="title">
                        	预约体验
                        </div>
                        <div class="count" data-number="{$ci}">
                        	
                        </div>
                        <div class="inputBlock">
                        	<input type="text" placeholder="您的姓名" required name="name">
                        </div>
                        <div class="inputBlock" id="distpicker">
                        	<select data-province="省" name="sheng" id="sheng">

                            </select><select data-city="市" name="shi" id="shi">

                            </select><select data-district="区" name="qu" id="qu">

                            </select>
                        </div>
                        <div class="inputBlock">
                        	<select style="width:100%;" name="tiyan" id="tiyan">
                            	<option value="0">体验门店</option>
                                <volist name="tiyan" id="vo">
                                <option value="{$vo.address}">{$vo.address}</option>
                             </volist>
                            </select>
                        </div>
                        <div class="inputBlock">
                        	<input class="datetime" type="text" placeholder="体验日期" name="time" data-field="datetime" readonly required>
                        </div>
                        <div class="inputBlock">
                        	<input type="text" placeholder="手机号码" required name="tel">
                        </div>
                        <div class="inputBlock sp1">
                        	<input type="checkbox" id="checkboxid" checked>我已阅读并接受<a href="#">《装修常见问题条款》</a>
                        </div>
                        <input type="hidden" id="yuyue" value="{$_SESSION['userid']}">
                        <div class="inputBlock btn">
                        	<button id="butt" type="submit">立即预约</button>
                        </div>
                        </form>
                    </div>
                    <div class="banner fr">

                    	<div id="slideBox" class="slideBox">
                            <div class="hd">
                                <ul></ul>
                            </div>
                            <div class="bd">
                                <ul>
                                    <volist name="roll" id="vo">
                                    <li><a href="#"><img src="Uploads/{$vo.pic}"></a></li>
                                    </volist>
                                </ul>
                            </div>

                        </div>

                    </div>
                    <div class="clear"></div>
                </div>

                <div class="cont2">
                	<div class="indexTitle itBorder">
                    	<div class="theTitle fl">
                        	<h1>DISPLAY GOODS</h1>
                            <h2>展示商品</h2>
                        </div>
                        <div class="itNav fr">
                        	<ul>
                            	<volist name="type" id="vo">
                                <li class="sh">
                                	<a href="javascript:;"    data-arr="{$vo.id}">
                                        <img src="App/Home/View/Public/{$vo.img}">
                                        <p>{$vo.type_name}</p>
                                    </a>
                                </li>
                                </volist>
                                <li class="clear"></li>
                            </ul>
                        </div>
                        <div class="clear"></div>
                    </div>
                    <div class="c2list">
                    <volist name="shangpin" id='vo'>
                   <div class="c2li c2li2 fl">
                            <a class="img" href="{:U('Shop/detail',array('id'=>$vo[id]))}">
                                <img src="Uploads/{$vo.img}">
                                <b>{$vo.name}</b>
                            </a>
                            
                        
                        </div>
                 </volist>
                        <div class="clear"></div>
                    </div>
                </div>
           <div class="clear"></div>
                <div class="cont3">
                	<div class="indexTitle">
                    	<div class="theTitle fl">
                        	<h1>DESIGNER</h1>
                            <h2>设计师</h2>
                        </div>
                        <div class="clear"></div>
                        <a class="more" href="{:U('Sheji/index')}">更多》</a>
                    </div>
                    <div class="c3list">
                    	
                        
                        
                    <volist name="sheji" id='vo'>
                        <div class="c3li fl">
                        	<div class="img">
                            	<a href="{:U('sheji/detail',array('id'=>$vo[id]))}"><img width="80" height="80" src="Uploads/{$vo.touxiang}"></a>
                            </div>
                            <h1>{$vo.user}</h1>
                            <ul>
                          <!--   	<li>
                                	<img src="../Public/images/c3list_icon01.png">
                                    <p>28人预约</p>
                                </li> -->
                                <li style="margin-left: 30px">
                                	<img src="../Public/images/c3list_icon02.png">
                                    <p>9.8分</p>
                                </li>
                                <li>
                                	<img src="../Public/images/c3list_icon03.png">
                                    <p>{$vo.count}套作品</p>
                                </li>
                                <li class="clear"></li>
                            </ul>
                            <h2>擅长风格：{$vo.fengge}</h2>
                            <h2>服务城市：{$vo.chengshi}</h2>
                        </div>
                        </volist>
                        <div class="clear"></div>
                    </div>
                </div>

           
<div class="clear"></div>
                <div class="c5blank">
                	<div class="cont5 fl">
                    	<div class="indexTitle">
                            <div class="theTitle fl">
                                <h1>CIRCLE</h1>
                                <h2>圈子</h2>
                            </div>
                            <div class="clear"></div>
                            <a class="more" href="{:U('Quanzi/index')}">更多》</a>
                        </div>
                        <div class="c5list">
                        	<ul>
                            <volist name="quanzi" id="vo">
                            	<li>
                              
                                	<div class="img">
                                		<a href="{:U('Quanzi/details',array('id'=>$vo[id]))}"><img width="409" height="164" src="Uploads/{$vo.img}"></a>
                                    </div>
                                   
                                    <div class="info">
                                    	<img src="Uploads/{$vo.touxiang}">{$vo.user}
                                        <h1><a href="{:U('Quanzi/details',array('id'=>$vo[id]))}">{$vo.title}</a></h1>
                                    </div>
                                    <div class="text">
                                    	{$vo.content}
                                    </div>
                                </li>
                               </volist>
                        
                                <li class="clear"></li>
                            </ul>
                        </div>
                        <div class="indexTitle">
                            <div class="theTitle fl">
                                <h1>INFORMATION</h1>
                                <h2>资讯</h2>
                            </div>
                            <div class="clear"></div>
                            <a class="more" href="{:U('Zixun/index')}">更多》</a>
                        </div>
                        <div class="c5list">
                        	<ul> 
                             <volist name="zixun" id="vo">

                            	<li>
                                	<div class="img">
                                		<a href="{:U('Zixun/detail',array('id'=>$vo[id]))}"><img width="409" height="164" src="Uploads/{$vo.pic}"></a>
                                    </div>
                                
                                
                                    <div class="question">
                                    	<dl>
                                      
                                        	<dd>
                                            	<a href="{:U('Zixun/detail',array('id'=>$vo[id]))}"> {$vo.title}</a>
                                            </dd>
                                           
                                        </dl>
                                    </div>
                                </li>
                                </volist>
                        
                                <li class="clear"></li>
                            </ul>
                        </div>
                    </div>
                    <div class="qr fr">
                    	<div class="qrTitle">
                        	官方微信
                        </div>
                        <div class="qrCont">
                        	<h1>润格微信</h1>
                            <img src="../Public/uploadfile/images/qr.jpg">
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>

        </div>
        <div id="dtBox"></div>
    </div>
    <!--contain end-->
</div>
<include file="Common:footer"/>
<script>
jQuery(document).ready(function(e) {
    
	var init0 = function(){
		var num = $(".indexCont .cont1 .form .count").attr("data-number");
		
		var html = "";
		for(var n = num.length-1;n>=0;n--)
		{
			var thenum = parseInt(num/Math.pow(10,n));
			num = num%Math.pow(10,n);
			html += '<b>'+thenum+'</b>';
		}
		
		$(".indexCont .cont1 .form .count").html("今日已有"+html+"人预约");
		
	}
	
	init0();
	
	$("#distpicker").distpicker({
		autoSelect:false
	});
	
	$("#dtBox").DateTimePicker();
	
	jQuery(".slideBox").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"fold",autoPlay:true});
	
});

$(function(){
  $('#butt').click(function(){



 if(!$('#checkboxid').is(':checked')) {
   layer.alert('同意装修问题条款');
  return false;
    }

    if($('#tiyan').val()==0) {
   layer.alert('请选择体验门店');
  return false;
    }

 var yuyue= $('#yuyue').val();
   if (yuyue=='') {

    layer.alert('请登录后预约');
     return false;
   }
  })
    

    $('#shi').change(function(){
        var sheng = $('#sheng').val();
        var shi = $('#shi').val();
      
       $('#tiyan').html("<option value='0'>体验门店</option>");

     $.ajax({

         url:'{:U("Tiyan/chengshi")}',
         type:'post',
         data:{
           'parm':sheng+shi,

         },
         dataType:'json',
         success:function(data){
                  console.log(data);
           if (data!=0) {
          var str="<option value='0'>体验门店</option>";

          for (var i = 0; i < data.length; i++) {
            
            str+=' <option>'+data[i]['address']+'</option>';
                 


          }
            $('#tiyan').html(str);
       

           }

         }


     })





    })







})

</script>
    <script type="text/javascript">document.getElementById("menu1").className="curr";</script>
</body>
</html>
